package com.boge.core.controller;

import java.util.List;

import javax.annotation.Resource;

import com.boge.core.model.entity.User;
import com.boge.core.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class UserController {
	
	@Resource
	UserService userService;
	
	@RequestMapping()
	public String user(Model model){
		List<User> userList = userService.findAllUser();
		System.out.println("userList:" + userService.findAllUser());
		model.addAttribute("user", userList.get(0));
		return "user";
	}
	
}
